package com.irdstudio.efp.e4a.service.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.irdstudio.efp.e4a.service.domain.SRuleCollDtl;
import com.irdstudio.efp.e4a.service.domain.SRuleCollDtlParam;

/**
 * <p>
 * DAO interface:系统规则集明细参数表
 * 
 * @author common
 * @date 2018-05-03
 */
public interface SRuleCollDtlParamDao {

	public int insertSRuleCollDtlParam(SRuleCollDtlParam sRuleCollDtlParam);

	public int deleteByPk(SRuleCollDtlParam sRuleCollDtlParam);

	public int updateByPk(SRuleCollDtlParam sRuleCollDtlParam);

	public SRuleCollDtlParam queryByPk(SRuleCollDtlParam sRuleCollDtlParam);

	public List<SRuleCollDtlParam> queryAllOwnerByPage(SRuleCollDtlParam sRuleCollDtlParam);

	public List<SRuleCollDtlParam> queryAllCurrOrgByPage(SRuleCollDtlParam sRuleCollDtlParam);

	public List<SRuleCollDtlParam> queryAllCurrDownOrgByPage(SRuleCollDtlParam sRuleCollDtlParam);

	public int deleteByCollId(String collId);

	public int deleteByRuleCfgId(String collId);

	public int insertByRuleIdsNonExists(SRuleCollDtl sRuleCollDtl);

	public List<SRuleCollDtlParam> queryByRuleCollDtlId(String collDtlId);

	public int updateParamValByPkId(SRuleCollDtlParam sRuleCollDtlParam);

	/**
	 * 查询 规则集详细, 通过 右连接查询,会出现 param_id为空情况
	 * 
	 * @param collId
	 *            规则集 ID
	 * @return
	 */
	public List<SRuleCollDtlParam> queryByRuleCollId(String collId);

	/**
	 * 批量插入
	 * 
	 * @param ruleCollDtlParams
	 * @return
	 */
	public int insertMoreRuleCollDtlParams(@Param("ruleCollDtlParams") List<SRuleCollDtlParam> ruleCollDtlParams);

	/**
	 * 查询 规则集详细
	 * 
	 * @param collId
	 *            规则集 ID
	 * @return
	 */
	public List<SRuleCollDtlParam> queryAllsByRuleCollId(String collId);
}